<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <base href="<%=basePath%>">

    <title>My JSP 'Demo.jsp' starting page</title>

    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <!--
    <link rel="stylesheet" type="text/css" href="styles.css">
    -->
    <title>铁路运输登陆界面</title>
</head>

<body style=background-image:url(111.jpg);>
<center>
    <h1><font color="red">12593铁路运输用户注册界面</font></h1>
    <hr/>
    <br/>
    <br/>
    <%
        request.setCharacterEncoding("utf-8");
    %>
    <%

        Boolean flag = (Boolean) request.getAttribute("flag");
        System.out.println(flag);
        if (flag) {
    %>
    用户名字注册成功，两秒后将跳转回登陆界面。

    <%
        response.setHeader("refresh", "2;url=login.jsp");
    %>
    若两秒后为跳转，请点击<a href="login.jsp">这里</a>
    <%
    } else {
        request.setAttribute("err", "该用户名已注册，请重新注册");
    %>
    <jsp:forward page="register.jsp"/>
    <%
        }
    %>
</center>
</body>
</html>
